{block name="style"}
<style>
    .info .layui-table td .layui-table-cell {
        height: auto !important;
        overflow: visible;
        text-overflow: inherit;
        white-space: normal;
        word-break: break-all;
    }
    .info .layui-table td .layui-table-grrid-down{
        display: none;
    }
</style>
{/block}
<form action="{:sysuri()}" method="post" data-auto="true" class="layui-form layui-card info" data-table-id="BannerInfo">
    <div class="layui-card">
        <div class="layui-card-header"> 基本信息 </div>
        <div class="layui-card-body layui-form-item">
            <div class="layui-inline">
                <label class="layui-form-label">{:Lang("仓库")}:</label>
                <div class="layui-input-inline">
                    <input value='{$Warehouse.warehouse_c_name|default=""}' class="layui-input" readonly>
                </div>
            </div>

            <div class="layui-inline">
                <label class="layui-form-label label-required-next">{:Lang("货位")}:</label>
                <div class="layui-input-inline">
                    <select name="location_code" lay-search class="layui-select">
                        <option value=""></option>
                        {foreach $locationList as $id => $code}
                        <option value="{$code}" >{$code|default=''}</option>
                        {/foreach}
                    </select>
                </div>
            </div>
            <div class="layui-inline">
                <label class="layui-form-label">{:lang('第三方订单号')}</label>
                <div class="layui-input-inline">
                    <input name="order_no"  value='{$vo.order_no|default=""}' class="layui-input" required  placeholder="{:lang('第三方订单号')}">
                </div>
            </div>
            <div class="layui-inline">
                <label class="layui-form-label">{:lang('物流名称')}</label>
                <div class="layui-input-inline">
                    <input name="express_company" value='{$vo.express_company|default=""}' class="layui-input" required placeholder="{:lang('物流名称')}">
                </div>
            </div>
            <div class="layui-inline">
                <label class="layui-form-label">{:lang('物流单号')}</label>
                <div class="layui-input-inline">
                    <input name="express_no" value='{$vo.express_no|default=""}' required class="layui-input" placeholder="{:lang('物流单号')}">
                </div>
            </div>
            <div class="layui-inline">
                <label class="layui-form-label">{:lang('订单详情地址')}</label>
                <div class="layui-input-inline">
                    <input name="order_detail_url" value='{$vo.volume|default=""}' class="layui-input"  placeholder="{:lang('订单详情地址')}">
                </div>
            </div>
            <div class="layui-inline">
                <label class="layui-form-label">{:lang('添加时间')}</label>
                <div class="layui-input-inline">
                    <input name="create_at" value='{$vo.create_at|default=""}' class="layui-input"  placeholder="{:lang('发货时间')}">
                </div>
            </div>
            <div class="layui-inline">
                <label class="layui-form-label">{:lang('推送时间')}</label>
                <div class="layui-input-inline">
                    <input name="confirm_time" value='{$vo.confirm_time|default=""}' class="layui-input"  placeholder="{:lang('推送时间')}">
                </div>
            </div>
    </div>

    <div class="layui-card">
        <div class="layui-card-header"> 商品信息 </div>
        <div class="layui-card-body">
            <table id="OrderInfoList"></table>
        </div>
    </div>

    </div>
    <input type="hidden" value="{$vo.id|default=''}" name="id">
    <div class="hr-line-dashed" style="margin-top:15px;margin-bottom: 120px "></div>

    <div class="layui-form-item text-center text-bottom">
        <button class="layui-btn" type='submit'>确认入库</button>
    </div>
</form>

{block name="script"}
<script>
    layui.table.render({
            elem: '#OrderInfoList',
            // height: '500px',
            data: {$order_express_goods|raw},
        page: false,
        cols: [[
        {type: 'numbers', title: '{:lang("序号")}', width: 60, align: 'center', },
        {field: 'image', title: '{:lang("图片")}',  align: 'center', width: 100 ,templet:"#imgTpl"},
        {field: 'name', title: '{:lang("商品名称")}', align: 'left', minWidth: 120 ,templet:"#goodsTpl"},
        {field: 'spec_value', title: '{:lang("商品规格值")}', align: 'left', width: 140 ,templet:"#tradeTpl"},
        {field: 'num', title: '{:lang("商品数量")}', align: 'center', width: 80 },
    ]]
        ,done: function(res, curr, count){
        //动态监听表头高度变化，冻结行跟着改变高度
        $(".layui-table-header tr").resize(function () {
            $(".layui-table-header  tr").each(function (index, val) {
                $($(".layui-table-fixed .layui-table-header table tr")[index]).height($(val).height());
            });
        });
        //初始化高度，使得冻结行表头高度一致
        $(".layui-table-header tr").each(function (index, val) {
            $($(".layui-table-fixed .layui-table-header table tr")[index]).height($(val).height());
        });
        //动态监听表体高度变化，冻结行跟着改变高度
        $(".layui-table-body tr").resize(function () {
            $(".layui-table-body  tr").each(function (index, val) {
                $($(".layui-table-fixed .layui-table-body table tr")[index]).height($(val).height());
            });
        });
        //初始化高度，使得冻结行表体高度一致
        $(".layui-table-body tr").each(function (index, val) {
            $($(".layui-table-fixed .layui-table-body table tr")[index]).height($(val).height());
        })
    }
    });

</script>
<!--图片-->
<script type="text/html" id="imgTpl" >
    <img src="{{ d.image }}" class="preview-all" style="max-width: 80px;max-height: 80px;" data-tips-image data-tips-hover >
</script>
{/block}